<template>
    <div>
<table class="table">
    <thead>
        <tr>
            <td>序号</td>
            <td>姓名</td>
            <td>手机号</td>
            <td>账号</td>
            <td>密码</td>
            <td>所属角色</td>
            <td>创建人</td>
        </tr>
    </thead>
    <tbody v-for="d in showdata">
    <tr>

          
            <td>{{ d.id }}</td>
            <td>{{ d.name }}</td>
            <td>{{ d.phone.substring(0,3)+"****"+d.phone.substring(7) }}</td>
            <td>{{ d.nick }}</td>
            <td>*****</td>
            <td>{{ d.role }}</td>
            <td>{{ d.createname }}</td>
   </tr>
    </tbody>
    
</table>
    </div>
</template>

<script setup lang="ts">
import {ref,onMounted} from 'vue'
import axios from 'axios'

onMounted(()=>{
    Show()
})

const showdata=ref([{
    "id": 0,
    "name": "string",
    "phone": "string",
    "nick": "string",
    "password": "string",
    "role": "string",
    "createname": "string"
}])

const Show=()=>{
    axios.get("/api/User/GetUsers").then(res=>{
      showdata.value=res.data
    })
}


</script>

<style scoped>

</style>